<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('商标库列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <p>商标名称：</p>
                                <input type="text" name="trademarkName"/>
                            </li>
                            <li>
                                <p>注册证号：</p>
                                <input type="text" name="trademarkCode"/>
                            </li>
                            <li class="select-time">
                                <p>注册日期：</p>
                                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTrademarkDate]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTrademarkDate]"/>
                            </li>
                            <li>
                                <p>商标类别：</p>
                                <select name="trademarkType" th:with="type=${@dict.getType('')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            <li>
                                <p>商标图片：</p>
                                <input type="text" name="trademarkImage"/>
                            </li>
                            <li>
                                <p>商标价格：</p>
                                <input type="text" name="trademarkPrice"/>
                            </li>
                            <li>
                                <p>主体名称：</p>
                                <input type="text" name="principalName"/>
                            </li>
                            <li>
                                <p>商标拥有者：</p>
                                <input type="text" name="trademarkOwner"/>
                            </li>
                            <li>
                                <p>商标审核：</p>
                                <input type="text" name="trademarkVerify"/>
                            </li>
                            <li>
                                <p>联系人：</p>
                                <input type="text" name="contactName"/>
                            </li>
                            <li>
                                <p>联系电话：</p>
                                <input type="text" name="contactPhone"/>
                            </li>
                            <li class="select-time">
                                <p>创建时间：</p>
                                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreatedTime]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreatedTime]"/>
                            </li>
                            <li class="select-time">
                                <p>修改时间：</p>
                                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginUpdatedTime]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endUpdatedTime]"/>
                            </li>
                            <li class="select-time">
                                <p>删除时间：</p>
                                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginDeletedTime]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endDeletedTime]"/>
                            </li>
                            <li>
                                <p>创建者：</p>
                                <input type="text" name="createdBy"/>
                            </li>
                            <li>
                                <p>修改者：</p>
                                <input type="text" name="updatedBy"/>
                            </li>
                            <li>
                                <p>删除者：</p>
                                <input type="text" name="deletedBy"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="bajiaostar:jbhWetrademark:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="bajiaostar:jbhWetrademark:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="bajiaostar:jbhWetrademark:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="bajiaostar:jbhWetrademark:export">
                    <i class="fa fa-download"></i> 导出
                 </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table" data-mobile-responsive="true"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('bajiaostar:jbhWetrademark:edit')}]];
        var removeFlag = [[${@permission.hasPermi('bajiaostar:jbhWetrademark:remove')}]];
        var prefix = ctx + "bajiaostar/jbhWetrademark";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "商标库",
                columns: [{
                    checkbox: true
                },
                {
                    field : 'id', 
                    title : '自动编号',
                    visible: false
                },
                {
                    field : 'trademarkId', 
                    title : '商标编号'
                },
                {
                    field : 'trademarkName', 
                    title : '商标名称'
                },
                {
                    field : 'trademarkDesc', 
                    title : '商标描述'
                },
                {
                    field : 'trademarkCode', 
                    title : '注册证号'
                },
                {
                    field : 'trademarkDate', 
                    title : '注册日期'
                },
                {
                    field : 'trademarkType', 
                    title : '商标类别'
                },
                {
                    field : 'trademarkImage', 
                    title : '商标图片'
                },
                {
                    field : 'trademarkPrice', 
                    title : '商标价格'
                },
                {
                    field : 'principalName', 
                    title : '主体名称'
                },
                {
                    field : 'trademarkOwner', 
                    title : '商标拥有者'
                },
                {
                    field : 'trademarkVerify', 
                    title : '商标审核'
                },
                {
                    field : 'contactName', 
                    title : '联系人'
                },
                {
                    field : 'contactPhone', 
                    title : '联系电话'
                },
                {
                    field : 'extend', 
                    title : '扩展字段'
                },
                {
                    field : 'remark', 
                    title : '备注'
                },
                {
                    field : 'createdTime', 
                    title : '创建时间'
                },
                {
                    field : 'updatedTime', 
                    title : '修改时间'
                },
                {
                    field : 'deletedTime', 
                    title : '删除时间'
                },
                {
                    field : 'createdBy', 
                    title : '创建者'
                },
                {
                    field : 'updatedBy', 
                    title : '修改者'
                },
                {
                    field : 'deletedBy', 
                    title : '删除者'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>